package com.taotao.web.controller;

import com.taotao.web.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * Created by zjj on 2018/12/11.
 */
@Controller
public class IndexController {
    @Autowired
    private IndexService indexService;

    @RequestMapping(value = "index",method = {RequestMethod.POST,RequestMethod.GET})
    public ModelAndView index(){
        ModelAndView mv = new ModelAndView("index");
        String indexAd1 = this.indexService.queryIndexAd1();
        mv.addObject("indexAd1",indexAd1);
        return mv;
    }
}
